package com.wn.class30.service;

import com.wn.class30.entity.*;
import io.swagger.models.auth.In;

import java.util.List;
import java.util.Map;

public interface UserService {
    //新增关注用户
    public void insertUser(User user) throws Exception ;
    //用户取关
    public void updateUser(User user) throws Exception;

    public List<User> queryByOpenid(String openid) throws Exception;

    public Vip queryLvNameByUserid(Integer userid) throws Exception;

    public List<UserCupon>  queryUserCuponByUserid(Integer userid) throws Exception;
    //获取vip套餐
    public List<Meal> queryMeal();
    //根据用户id查询用户信息
    public User queryUserByUderid(Integer userId);
    //查询所有vip等级
    public List<Vip> queryAllVip();

    //查询用户和其对应的优惠券,三表联立
    public List<Map<String, Object>> queryUserCupon2(Integer userid);

    public void updatePointsByUserid(Integer userid, Integer points);

    //存入用户手机号码
    public void updatePhone(Integer uid,String phone);
    //查询套餐表和vip等级表
    public List<Map<String,Object>> selectMealAndVip(Integer mealId);
    //根据套餐表和vip等级表更新用户信息
    public void updateUserByMealAndVip(Integer userid,Map<String, Object> mealAndVip);
    //新增nealpay表
    public MealPay insertMealPay(List<Map<String,Object>> mealAndVip, User user);
    //判断用户的手机号是否存在
    public String checkPhoneExist(Integer uid);

}
